<?php

class Form_Forgot extends Zend_Form
{

    public $buttonDecorators = array(
        'ViewHelper',
        array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'block')));

    public function init()
    {
        $this->setMethod(self::METHOD_POST);

        /* this Elements & Other Definitions Here ... */
        $email = $this->createElement('text', 'email');
        $email->setRequired(true);
        $email->addFilter('StringToLower');
        $email->addFilter("StringTrim");
        $email->addValidator("EmailAddress");
        $email->addValidator(new Validate_EmailExists());
        $email->setLabel('E-mail');
        $this->addElement($email);


        // Using both captcha and captchaOptions:
        $captcha = new Zend_Form_Element_Captcha('captcha', array(
                    'label' => "Please verify you're a human",
                    'captcha' => 'Figlet',
                    'captchaOptions' => array(
                        'captcha' => 'Figlet',
                        'wordLen' => 6,
                        'timeout' => 300,
                    ),
                ));

        $this->addElement($captcha);

        $button = $this->createElement('button', 'Confirm_button', array("label" => "Confirm", "type" => "submit", "class" => "thoughtbot", "decorators" => $this->buttonDecorators));
        $this->addElement($button);
    }

}

